namespace ::

entry {
    ShowWindow({
        @use count = State(0),
        @use dec = PlainButton('-'),
        @use inc = PlainButton('+'),
        @use Effect((count bind-update (dec.Clicks map-to { n => (n - 1) }))),
        @use Effect((count bind-update (inc.Clicks map-to { n => (n + 1) }))),
        let text = count.$ | map({ n => String('  [',n,']  ') }),
        @use lbl = Label(text, Center),
        Window($('Counter'), Row(dec.Widget, lbl.Widget, inc.Widget))
    })
}


